package com.broada.apm.indicator.api.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.broada.apm.dao.ApplicationDao;
import com.broada.apm.indicator.api.ApplicationService;
import com.broada.apm.model.ApplicationSystem;

public class ApplicationServiceImpl implements ApplicationService{

	@Autowired
	private ApplicationDao applicationDao;
	
	@Override
	public void addApplication(ApplicationSystem application) {
		applicationDao.addApplication(application);
	}

	@Override
	public void updateApplication(ApplicationSystem application) {
		applicationDao.updateApplication(application);
	}

	@Override
	public void updateApplicationWithRelation(ApplicationSystem application) {
		applicationDao.updateApplicationWithRelation(application);
	}

	@Override
	public void deleteApplication(ApplicationSystem application) {
		applicationDao.deleteApplication(application);
	}

	@Override
	public List<ApplicationSystem> getAllApplications() {
		return applicationDao.getAllApplications();
	}

	@Override
	public ApplicationSystem getApplicationById(String appId) {
		return applicationDao.getApplicationById(appId);
	}

	@Override
	public ApplicationSystem getApplicationWithServiceAndRelById(String appId) {
		return applicationDao.getApplicationWithServiceAndRelById(appId);
	}

	@Override
	public ApplicationSystem getApplicationByAppName(String appName) {
		return applicationDao.getApplicationByName(appName);
	}

	@Override
	public List<ApplicationSystem> getApplicationByCondition(ApplicationSystem application) {
		return applicationDao.getApplicationByCondition(application);
	}

	@Override
	public void saveAppsInOverview(List<String> appIds) {
		applicationDao.saveAppsInOverview(appIds);
		
	}

	@Override
	public List<ApplicationSystem> queryApplicationsByNames(String[] appNames) {
		return applicationDao.getApplicationsByNames(appNames);
	}

	@Override
	public List<ApplicationSystem> queryApplicationsByIds(String[] appIds) {
		return applicationDao.getApplicationsByIds(appIds);
	}

}
